export default {
    getShader: function () {
        return `
    precision mediump float;
    uniform sampler2D u_Sampler;
    varying vec2 v_Pin;
    void main(){
       
        float set = 0.34;
        float mw = 0.1;
        float mh = 0.1;

        vec2 uv = v_Pin;
        bool judge = true;
        
        for(float i = 1.0; i <= 10.0; i++){
            for(float j = 1.0; j <= 10.0; j++){
                if(uv.x < i * mw && uv.y < j * mh){
                    float random = sin(i * j * set * 1000.0);
                    uv.x = smoothstep(-3.14, 3.14, uv.x + random);
                    uv.y = smoothstep(-3.14, 3.14, uv.y - random);
                    judge = false;
                    break;
                }
            }
            if(judge == false){
                break;
            }
        }

        gl_FragColor = texture2D(u_Sampler, uv);
        //gl_FragColor = vec4(1.0);
    }
        `;
    }
}
